package com.jyxd.web.service.czhis;

import com.jyxd.web.dao.czhis.OperatorDao;
import com.jyxd.web.data.czhisdata.Operator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OperatorService {

    @Autowired
    private OperatorDao operatorDao;

    /**
     * 新增一条操作者信息
     *
     * @param
     * @return
     */
    public boolean insert(Operator operator) {
        return operatorDao.insert(operator);
    }



    /**
     * 根据主键id查询一条记录
     *
     * @param id
     * @return Role
     */
    public Operator queryData(String id) {
        return operatorDao.queryData(id);
    }



    /**
     * 更新一条表记录
     *
     * @param operator
     * @return boolean
     */
    public boolean update(Operator operator) {
        return operatorDao.update(operator);
    }

    /**
     * 根据条件分页查询表记录列表
     *
     * @param map
     * @return list
     */
    public List<Operator> queryList(Map<String, Object> map) {
        return operatorDao.queryList(map);
    }

    /**
     * 根据条件查询列表总记录数
     *
     * @param map
     * @return
     */
    public int queryNum(Map<String, Object> map) {
        return operatorDao.queryNum(map);
    }
}
